#@layout("菜单管理")
#define css()
	<link rel="stylesheet" href="#(ctxAdSt)/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
#end
#define main()
<body class="timo-layout-page">
    <div class="layui-card timo-tree" data-url='#(ctxAd)/menu/list#(search ??)' >
        <div class="layui-card-header timo-card-header">
            <span><i class="fa fa-bars"></i> 菜单管理</span>
            <i class="layui-icon layui-icon-refresh refresh-btn"></i>
        </div>
        <div class="layui-card-body layui-row">
            <div class="layui-col-lg2 layui-col-sm3">
                <div class="layui-card timo-nav-tree">
                    <div class="layui-card-header">菜单结构</div>
                    <div class="layui-card-body">
                        <ul class="ztree"></ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-lg10 layui-col-sm9">
                <div class="layui-row timo-card-screen">
                    <div class="pull-left layui-form-pane timo-search-box">
                        <!-- 
                        <div class="layui-inline">
                            <label class="layui-form-label">状态</label>
                            <div class="layui-input-block timo-search-status">
                                <select class="timo-search-select" name="status">
                                	<option value="1">正常</option>
                                	<option value="2">冻结</option>
                               	</select>
                            </div>
                        </div>
                         -->
                        <div class="layui-inline">
                            <label class="layui-form-label">名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="sysMenu.title" value="#(sysMenu.title ??)" placeholder="请输入菜单名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">URL地址</label>
                            <div class="layui-input-block">
                                <input type="text" name="sysMenu.url" value="#(sysMenu.url ??)" placeholder="请输入菜单URL地址" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn timo-search-btn">
                                <i class="fa fa-search"></i>
                            </button>
                        </div>
                    </div>
                    <div class="pull-right screen-btn-group">
                        <button class="layui-btn open-popup popup-add" data-title="添加菜单" data-url="#(ctxAd)/menu/add"  data-size="540,500">
                            <i class="fa fa-plus"></i> 添加</button>
                        <div class="btn-group">
                            <button class="layui-btn">操作<span class="caret"></span></button>
                            <dl class="layui-nav-child layui-anim layui-anim-upbit">
                            	<!-- 
                                <dd><a class="ajax-status" href="#(ctxAd)/menu/status/ok">启用</a></dd>
                                <dd><a class="ajax-status" href="#(ctxAd)/menu/status/freezed">冻结</a></dd>
                            	 -->
                                <dd><a class="ajax-status" href="#(ctxAd)/menu/delete">删除</a></dd>
                            </dl>
                        </div>
                    </div>
                </div>
                <table class="layui-table timo-table timo-tree-table">
                    <thead>
                    <tr>
                        <th class="timo-table-checkbox">
                            <label class="timo-checkbox"><input type="checkbox">
                                <i class="layui-icon layui-icon-ok"></i></label>
                        </th>
                        <th>名称</th>
                        <th>URL地址</th>
                        <th>权限标识</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody class="tree-hide">
                    <tr class="{{$hide}}" tree-pid="{{pid}}" tree-id="{{id}}">
                        <td><label class="timo-checkbox"><input type="checkbox" value="{{id}}"><i class="layui-icon layui-icon-ok"></i></label></td>
                        <td>{{title}}</td>
                        <td>{{url}}</td>
                        <td>{{permission}}</td>
                        <td>
                            <a class="open-popup popup-edit" data-title="编辑菜单" data-url="#(ctxAd)/menu/edit?id={{id}}"  data-size="540,500" href="#">编辑</a>
                            <!-- <a class="open-popup" data-title="详细信息" data-url="#(ctxAd)/menu/detail/{{id}}"  data-size="800,600" href="#">详细</a> -->
                            <a class="ajax-get popup-delete" data-msg="您是否确定删除" href="#(ctxAd)/menu/delete?ids={{id}}">删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</body>
#end
#define js()
	<script type="text/javascript" src="#(ctxAdSt)/js/plugins/jquery-3.3.1.min.js"></script>
	<script type="text/javascript" src="#(ctxAdSt)/lib/zTree_v3/js/jquery.ztree.core.min.js"></script>
	<script type="text/javascript" src="#(ctxAdSt)/lib/zTree_v3/js/jquery.ztree.exedit.min.js"></script>
	<script type="text/javascript" src="#(ctxAdSt)/js/timoTree.js"></script>
	<script type="text/javascript">
	    $.fn.timoTree();
	</script>
#end